from PyQt4 import QtGui


def dialog(ui):
    Dialog = QtGui.QDialog()
    Dialog.setModal(True)
    Dialog.ui = ui
    Dialog.ui.setupUi(Dialog)
    return Dialog

def show(Dialog):
    Dialog.show()
    return Dialog.exec_()


